.image-viewer-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #f8f8f8;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  .image-viewer-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;

    .image-viewer-wrapper {
      width: 100% !important;
      height: 100% !important;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f8f8f8;
      overflow: visible !important;

      .image-viewer-content-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible !important;

        .image-viewer-image {
          max-width: 100%;
          max-height: 100%;
          width: auto;
          height: auto;
          object-fit: contain;
          user-select: none;
          pointer-events: auto;
          cursor: grab;

          &:active {
            cursor: grabbing;
          }
        }
      }
    }

    .image-viewer-toolbar {
      position: absolute;
      top: 16px;
      right: 16px;
      z-index: 10;
      background: rgba(255, 255, 255, 90%);
      border-radius: 6px;
      padding: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 15%);
      backdrop-filter: blur(8px);

      .ant-btn {
        border: none;
        box-shadow: none;

        &:hover {
          background: rgba(0, 0, 0, 6%);
        }
      }

      .image-counter {
        font-size: 12px;
        color: #666;
        padding: 0 8px;
        display: flex;
        align-items: center;
        white-space: nowrap;
        min-width: 40px;
        justify-content: center;
      }
    }
  }

  // 全屏模式样式
  &:fullscreen {
    .image-viewer-toolbar {
      top: 24px;
      right: 24px;
    }
  }

  // 加载状态
  &.loading {
    .image-viewer-image {
      opacity: 0.5;
    }
  }

  // 错误状态
  &.error {
    .image-viewer-content {
      display: flex;
      align-items: center;
      justify-content: center;
      color: #999;
      font-size: 14px;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .image-viewer-container {
    .image-viewer-toolbar {
      top: 8px;
      right: 8px;
      padding: 4px;

      .ant-space {
        .ant-space-item {
          .ant-btn {
            padding: 4px 8px;
            font-size: 12px;
          }
        }
      }
    }
  }
}

// 暗色主题支持
@media (prefers-color-scheme: dark) {
  .image-viewer-container {
    background: #1f1f1f;

    .image-viewer-content {
      .image-viewer-wrapper {
        background: #1f1f1f;
      }

      .image-viewer-toolbar {
        background: rgba(0, 0, 0, 80%);
        color: #fff;

        .image-counter {
          color: #ccc;
        }
      }
    }
  }
}
